forked from JuliaLang/julia
-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merge upstream 909c57f #14
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Certain queries were searching for Type{T} instead of T due to a mistaken tparam setting, resulting in missing methods in lookup. Fix JuliaLang#49408 Ref JuliaLang#48925
add morespecific rule for Type{Union{}}
…ion{}} otherwise (JuliaLang#49393) This was a primary motivation for JuliaLang#49111. Previously, we'd see some some method specializations such as `convert(::Type{T}, ::T) where T<:Float64` (apparently from inference of some tuple convert specializations), which were not necessary to have.
Code should normally preserve values, not the types of values. This ensures the user can define styles with metadata, and requires less type-parameter-based programming, but rather can focus on the values.
Even if we have a new method that is more specific than the method it is replacing, there still might exist an existing method that is more specific than both which already covers their intersection. An example of this pattern is adding Base.IteratorSize(::Type{<:NewType}) causing invalidations on Base.IteratorSize(::Type) for specializations such as Base.IteratorSize(::Type{<:AbstractString}) even though the intersection of these is fully covered already by Base.IteratorSize(::Type{Union{}}) so our new method would never be selected there. This won't detect ambiguities that already cover this intersection, but that is why we are looking to move away from that pattern towards explicit methods for detection in closer to O(n) instead of O(n^2): JuliaLang#49349. Similarly, for this method, we were unnecessarily dropping it from the MethodTable cache. This is not a significant latency problem (the cache is cheap to rebuild), but it is also easy to avoid in the first place. Refs JuliaLang#49350
…ure (JuliaLang#49404) Inference should have already made this edge from this item, so we do not want to add another wider edge. Even if this target object contains some invalid code later, inference already showed that does not affect our code-paths, so we don't need or want that wide edge.
We did a load/store on every iteration. Keep a temporary in a register instead. It's a very small difference but it's visible in vtune.
* Fix inference of one-arg `return_type` method `Core.Compiler.return_type` has two methods: - return_type(f, args::Type{<:Tuple}) - return_type(args::Type{<:Tuple}) Our inference code was only catching the first one. Expand it to support both. * Update test/compiler/inference.jl --------- Co-authored-by: Shuhei Kadowaki <40514306+aviatesk@users.noreply.github.com>
* Add ITT synchronization profiling calls * Init mutexes with name * Functions -> macros * remove env checking * error when both ITTAPI and DTrace are requested * Update Make.inc * Move timing functions to timing.h --------- Co-authored-by: Valentin Churavy <v.churavy@gmail.com> Co-authored-by: Valentin Churavy <vchuravy@users.noreply.github.com>
* Add missing entry to invalidation log Addresses timholy/SnoopCompile.jl#357 (comment) using the observation in the following comment. Co-authored-by: Jameson Nash <vtjnash@gmail.com> * Fix indentation --------- Co-authored-by: Jameson Nash <vtjnash@gmail.com>
…especific-bottom Revert "add morespecific rule for Type{Union{}}"
…uliaLang#49439) This commit annotates the signature type of the first argument of `kwcall` method as `kwargs::NamedTuple`. Previously it's annotated as `::Any` but only `NamedTuple` object is supported (and synthesized by the frontend) as the first argument to `kwcall` method.
…ng#49376) * Improve `simple_meet` resolution. * Fix for many-to-one cases. * Test disjoint via `jl_has_empty_intersection`
Removes some overly strict `@test_throws MethodError` for calls with `Union{}` or `Any`, in preparation for making those errors more precise.
Make Type{Union{}} in method definitions always the most specific type (normally these would end up being ambiguous). This ensures we do not invalidate them, nor need to consider ambiguities that might arise from intersections with them.
This commit includes a bit of refactoring of `Base.aligned_sizeof` to make it more inference-friendly, especially in cases like `Base.aligned_sizeof(::Union{DataType,Union})`. In particular, it eliminates the chance of inference accounting for a method error of `datatype_alignment(::Union)` in the second branch. xref: <aviatesk/JET.jl#512>
This is yet another followup to JuliaLang#49692 and JuliaLang#49750. With the introduced change, we kill the CFG edge from the basic block with the discovered error to its successors. However, we have an invariant in the verifier that the CFG should always match the IR. Turns out this is for good reason, as we assume in a number of places (including, ironically in the irinterp) that a GotoNode/GotoIfNot terminator means that the BB has the corresponding number of successors in the IR. Fix all this by killing the rest of the basic block when we discover that it is unreachable and if possible introducing an unreachable node at the end. However, of course if the erroring statement is the fallthrough terminator itself, there is no space for an unreachable node. We fix this by tweaking the verification to allow this case, as its really no worse than the other problems with fall-through terminators (JuliaLang#41476), but of course it would be good to address that as part of a more general IR refactor.
Update LibTracyClient checksums
…ang#49774) - atexit(f) mutates global shared state. - atexit(f) can be called anytime by any thread. - Accesses & mutations to global shared state must be locked if they can be accessed from multiple threads. Add unit test for thread safety of adding many atexit functions in parallel
…tten reorder ml-matches to avoid catastrophic performance case
jitlayers: move the local dylibs ahead of the global one
If a fall-through terminator was already Bottom, we should not attempt to rekill the successor edge, because it was already deleted. Yet another fix in the JuliaLang#49692, JuliaLang#49750, JuliaLang#49797 series, which is turning out to be quite a rabit hole. Also fix a typo in the verifer tweak where we were looking at the BB idx rather than the terminator idx.
…ions Count invalidations, JIT memory, and image memory in profiling reports
qinsoon
pushed a commit
to qinsoon/julia
that referenced
this pull request
May 2, 2024
…Lang#53477) Stdlib: Distributed URL: https://github.com/JuliaLang/Distributed.jl Stdlib branch: master Julia branch: master Old commit: 41c0106 New commit: 6a07d98 Julia version: 1.12.0-DEV Distributed version: 1.11.0(Does not match) Bump invoked by: @IanButterworth Powered by: [BumpStdlibs.jl](https://github.com/JuliaLang/BumpStdlibs.jl) Diff: JuliaLang/Distributed.jl@41c0106...6a07d98 ``` $ git log --oneline 41c0106..6a07d98 6a07d98 Merge pull request JuliaLang#93 from JuliaLang/ib/guard_rmprocs 41cd14f suppress interrupt trace from SIGTERM test 2b23ae4 guard rmprocs in tests 8c03305 do not call worker_from_id with pid<1 (JuliaLang#92) 25ee836 Add warning about new workers not sharing prior global state (mmtk#14) ``` Co-authored-by: Dilum Aluthge <dilum@aluthge.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.